$(function(){
	$("#functionNav").attr("href",navAddr);
	//获取Url中的参数
	id = GetQueryString("id");
	//获取并填充出退库藏品信息
	var ctkCpJson = ajaxResult("get",false,ProjectName+"/colmanage.getCtkCp.do",{"id":id});
	loadData("#form1",ctkCpJson.data);	
	$("#form1 input[name=ckyssj]").val(dataFormat(ctkCpJson.data.ckyssj));
	$("#form1 input[name=cksj]").val(dataFormat(ctkCpJson.data.cksj));
	$("#form1 input[name=tksj]").val(dataFormat(ctkCpJson.data.tksj));
	$("#form1 input[name=tkyssj]").val(dataFormat(ctkCpJson.data.tkyssj));
	$("#form1 input[name=ckyssj]").val(dataFormat(ctkCpJson.data.ckyssj));
	var cpfl1Json = ajaxResult("get",false,ProjectName+"/sysmanage.getNameInJbByIdTableName.do",{'tableName':'jb_cplb','id':ctkCpJson.data.cpfl1});
	var cpfl2Json = ajaxResult("get",false,ProjectName+"/sysmanage.getNameInJbByIdTableName.do",{'tableName':'jb_cplb','id':ctkCpJson.data.cpfl2});
	var cpfl3Json = ajaxResult("get",false,ProjectName+"/sysmanage.getNameInJbByIdTableName.do",{'tableName':'jb_cplb','id':ctkCpJson.data.cpfl3});
	var cpfl = "";
	if(cpfl3Json.rows.length>0){
		cpfl=cpfl1Json.rows[0].name +""+ cpfl2Json.rows[0].name +""+ cpfl3Json.rows[0].name;
	}else if(cpfl2Json.rows.length>0){
		cpfl=cpfl1Json.rows[0].name +""+ cpfl2Json.rows[0].name ;
	}else{
		cpfl=cpfl1Json.rows[0].name;
	}
	$('#form1 input[name=cpfl]').val(cpfl);
	var lyztJson = ajaxResult("get",false,ProjectName+"/sysmanage.getNameInJbByIdTableName.do",{'tableName':'xtjb_lyzt','id':ctkCpJson.data.lyzt});
	$('#form1 input[name=lyzt]').val(lyztJson.rows[0].name);
	
	
	if(ctkCpJson.data.bckbz==1){
		$("#form1 input[name=bckbz]").val("取消出库");
	}else{
		$("#form1 input[name=bckbz]").val("");
	}
	if(ctkCpJson.data.cpzt==1){
		$("#form1 input[name=cpzt]").val("完成");
	}else{
		$("#form1 input[name=cpzt]").val("未完成");
	}
	if(ctkCpJson.data.dbyx!=null && ctkCpJson.data.dbyx!=""){
		$("#form1 input[name=dbyx]").attr("src",imageAddr+ctkCpJson.data.dbyx);
	}
})
